//
//  TTMusicDiscoveryPageFirstCollectionVIewCell.m
//  TTMusic
//
//  Created by chenpengyu on 16/3/31.
//  Copyright © 2016年 cpy. All rights reserved.
//

#import "TTMusicDiscoveryPageFirstCollectionVIewCell.h"
#import "CPYDiscoveryPageDataDetailModel.h"
@implementation TTMusicDiscoveryPageFirstCollectionVIewCell

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.imageArray = [NSMutableArray array];
//        self.backgroundColor = [UIColor cyanColor];
        
            }
    return self;
}
- (void)setDataModel:(CPYDiscoveryPageDataModel *)dataModel {
    _dataModel = dataModel;
    self.imageArray = [NSMutableArray array];
    for (CPYDiscoveryPageDataDetailModel *dataDetailModel in _dataModel.data) {
        [_imageArray addObject:dataDetailModel.picUrl];
    }
    

}
- (void)setImageArray:(NSMutableArray *)imageArray {
    _imageArray = imageArray;
    DCPicScrollView *dcp = [DCPicScrollView picScrollViewWithFrame:CGRectMake(0, 0, self.contentView.bounds.size.width, self.contentView.bounds.size.height) WithImageUrls:self.imageArray];
//    dcp.backgroundColor = [UIColor cyanColor];
    dcp.AutoScrollDelay = 2.0;
    
    dcp.style = PageControlAtRight;
    [self.contentView addSubview:dcp];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
